﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StudentClass
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter number of students: ");
            int studentCount = Int32.Parse(Console.ReadLine());
            Student[] students = new Student[studentCount];
            for (int i = 0; i < studentCount; i++)
            {
                Console.Clear();
                students[i] = new Student();
                students[i].CollectStudentInfo();
            }
            Console.Clear();
            for (int i = 0; i < studentCount; i++)
            {
                students[i].Progress();
                if (students[i].Progress() > 67)
                {
                    students[i].PrintStudentInfo();
                }
            }
        }
    }

    class Student
    {
        public string name;
        public string lastName;
        public string group;
        public int[] studentsMarks = new int [10];


        public void CollectStudentInfo()
        {
            Console.Write("Enter student's Name:");
            name=Console.ReadLine();
            Console.Write("Enter student's Last name:");
            lastName=Console.ReadLine();
            Console.Write("Enter student's Group:");
            group=Console.ReadLine();
            Console.Clear();
            Console.WriteLine("Enter student's progress (last 10 marks):");
            int mark = 0;
            for (int i = 0; i < 10; i++)
            {
                Console.Write("Mark {0} is: ", (i+1));
                mark = Int32.Parse(Console.ReadLine());
                studentsMarks[i] = mark;
            }
        }

        public void PrintStudentInfo()
        {
            Console.WriteLine("Student: {0} {1}, group {2} - average mark is: {3}", name, lastName, group, Progress());
        }

        public double Progress()
        {
            return studentsMarks.Average();
        }
    }
}
